Skip to content

Conversation

jburnt
Copy link
Contributor

@jburnt jburnt commented Oct 1, 2025

No description provided.

@jburnt jburnt changed the title Feat/marketplace asset marketplace Oct 1, 2025
let id = generate_id(vec![&collection.as_bytes(), &token_id.as_bytes()]);
let listing = Listing {
id: id.clone(),
seller: info.sender.clone(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the marketplace will act as the listing creator, when a sale is completed the funds are sent to the Marketplace contract and because the marketplace has no withdrawal mechanism for sellers to retrieve payments, the funds get stuck there permanently.

  1. Buyer purchases NFT
  2. Marketplace forwards payment to asset contract
  3. Asset contract sends payment to "seller" (which is marketplace address)
  4. Marketplace contract receives funds
  5. No recording of "owe seller X amount"
  6. No way for seller to withdraw
  7. Funds stuck in marketplace forever

Copy link
Contributor Author

@jburnt jburnt Oct 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@emperorjm I made @Peartes aware that when listing the seller should be the owner and not the marketplace because is acting as the operator

valid_payment(&info, price.clone(), listing.price.denom)?;

let buy_msg = asset_buy_msg(info.sender.clone(), listing.token_id.clone());

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should remove listing from marketplace storage after successful purchase.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

token_id: token_id.clone(),
price: price.clone(),
reservation: None,
marketplace_fee_bps: None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How should marketplace fees be handled? Also, is there a means of updating the fees?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should come from the config, I've added it now and also an UpdateConfig message that only the manager can execute.

_info: MessageInfo,
_id: String,
) -> Result<Response, ContractError> {
// TODO: Implement approve sale functionality
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this feature required?

_info: MessageInfo,
_id: String,
) -> Result<Response, ContractError> {
// TODO: Implement reject sale functionality
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this feature required?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants